home *** CD-ROM | disk | FTP | other *** search
/ PCMania 73 / PCMania CD73_1.iso / pcmania / vbasic73 / FORMPE~1.FRM next >
Text File  |  1998-09-28  |  3KB  |  96 lines

  1. VERSION 5.00
  2. Object = "{27395F88-0C0C-101B-A3C9-08002B2F49FB}#1.1#0"; "PICCLP32.OCX"
  3. Begin VB.Form Peonzas 
  4.    Caption         =   "Peonzas"
  5.    ClientHeight    =   2070
  6.    ClientLeft      =   3330
  7.    ClientTop       =   2610
  8.    ClientWidth     =   3885
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2070
  11.    ScaleWidth      =   3885
  12.    Begin VB.CommandButton Command2 
  13.       Caption         =   "Mapa"
  14.       Height          =   375
  15.       Left            =   1920
  16.       TabIndex        =   2
  17.       Top             =   1200
  18.       Width           =   1215
  19.    End
  20.    Begin VB.PictureBox Picture1 
  21.       AutoRedraw      =   -1  'True
  22.       Height          =   960
  23.       Left            =   600
  24.       ScaleHeight     =   60
  25.       ScaleMode       =   3  'Pφxel
  26.       ScaleWidth      =   65
  27.       TabIndex        =   1
  28.       Top             =   600
  29.       Width           =   1035
  30.    End
  31.    Begin VB.Timer Timer1 
  32.       Interval        =   1
  33.       Left            =   3360
  34.       Top             =   840
  35.    End
  36.    Begin VB.CommandButton Command1 
  37.       Caption         =   "Girar"
  38.       Height          =   375
  39.       Left            =   1920
  40.       TabIndex        =   0
  41.       Top             =   600
  42.       Width           =   1215
  43.    End
  44.    Begin PicClip.PictureClip PictureClip1 
  45.       Left            =   120
  46.       Top             =   1800
  47.       _ExtentX        =   10398
  48.       _ExtentY        =   4815
  49.       _Version        =   327680
  50.       Rows            =   3
  51.       Cols            =   6
  52.       Picture         =   "formpeonzas.frx":0000
  53.    End
  54. End
  55. Attribute VB_Name = "Peonzas"
  56. Attribute VB_GlobalNameSpace = False
  57. Attribute VB_Creatable = False
  58. Attribute VB_PredeclaredId = True
  59. Attribute VB_Exposed = False
  60. Dim x As Integer
  61. Dim toggle As Integer
  62.  
  63. Private Sub Command2_Click()
  64. 'Muestra el formulario mapa
  65. Mapa.Show
  66. End Sub
  67.  
  68. Private Sub Form_Load()
  69. 'Muestra una primera imagen de la peonza
  70. Picture1.ScaleMode = vbPixels
  71. Picture1.Picture = PictureClip1.GraphicCell(0)
  72. x = 0
  73. End Sub
  74.  
  75. Private Sub Command1_Click()
  76. 'Indica al control timer si la peonza estß girando o parada
  77.     If toggle = 0 Then
  78.         Command1.Caption = "Parar"
  79.         toggle = 1
  80.     Else
  81.         Command1.Caption = "Girar"
  82.         toggle = 0
  83.     End If
  84. End Sub
  85.  
  86. Private Sub girar()
  87. 'Si la subrutina del timer lo ordena, mueve la peonza un "fotograma"
  88.     x = x + 1: If x = 18 Then x = 0
  89.     Picture1.Picture = PictureClip1.GraphicCell(x)
  90. End Sub
  91. Private Sub Timer1_Timer()
  92. 'Importante:  acordaros de dar alg·n valor a la propiedad _
  93. interval del timer o no os funcionarß
  94.     If toggle = 1 Then girar
  95. End Sub
  96.